package com.example.factory.core.repository;

import com.example.factory.core.domain.Level1Dimension;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author Lei Tao
 */
@Repository
public interface Level1DimensionRepository extends CrudRepository<Level1Dimension, Long> {
    @Query("select l from Level1Dimension l where l.archived=false")
    List<Level1Dimension> selectedLevel1Dimensions();

    Level1Dimension findByGuidAndArchivedFalse(String level1Guid);
}
